/**
 * Copyright (c) 快宝网络 kuaidihelp.com Co., Ltd. All Rights Reserved 禁止外泄以及用于其它的商业用途
 */

import request from '@/utils/request';

/**
 * 获取区域基础价列表
 * @param params
 * @returns
 */
export async function getAreaBasePriceList(params: { page: string; size: string; area?: any }) {
  return request('/jdk/AreaBasePrice/getList', {
    method: 'POST',
    data: params,
  });
}

/**
 * 添加/修改区域基础价配置
 * @param params
 * @returns
 */
export async function setAreaBasePrice(params: {
  id?: string;
  brand: string;
  area: any;
  limit_type: '0' | '1';
  base_price: string;
  remark: string;
}) {
  return request(params.id ? '/jdk/AreaBasePrice/modify' : '/jdk/AreaBasePrice/create', {
    method: 'POST',
    data: params,
  });
}

/**
 * 删除区域基础价配置
 * @param params
 * @returns
 */
export async function removeAreaBasePrice(params: { id: string }) {
  return request('/jdk/AreaBasePrice/remove', {
    method: 'POST',
    data: params,
  });
}
